﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class teste : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        List<string> testList = new List<string>();
        testList.Add("number 1");
        testList.Add("number 2");
        testList.Add("number 3");
        testList.Add("number 4");
        testList.Add("number 5");


        Repeater1.DataSource = testList;
        Repeater1.DataBind();

    }

    protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
        {
            DropDownList testList = (DropDownList)e.Item.FindControl("testList");
            Label testLabel = (Label)e.Item.FindControl("testLabel");
            string test = (string)e.Item.DataItem;


            testLabel.Text = test;

            if (test == "number 1")
                testList.SelectedValue = "6";
            else
                testList.SelectedValue = "12";

        }
    } 
}